/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nsip.components.ds;

import nsip.util.LazyInitializingMap;

/**
 *
 * @author nico.rehwaldt
 */
public class StatisticMap extends LazyInitializingMap<StatisticType, Double> {

    @Override
    protected Double initialize(Object key) {
        return 0.0;
    }

    public void increment(StatisticType type) {
        put(type, get(type) + 1);
    }

    public void increment(String typeName) {
        increment(StatisticType.valueOf(typeName));
    }
}
